<template>
	<svg class="icon" aria-hidden="true" :style="style">
		<use :xlink:href="iconName"></use>
	</svg>
</template>
<script>
    export default {
			name: 'IconSvg',
			props: {
				icon: {
					type: String,
					default: ''
				},
				size: {
					type: Number,
					default: 20
				}
			},
			computed: {
				style () {
					return {
						fontSize: `${this.size}px`
					}
				},
				iconName () {
					return  `#icon-${this.icon}`
				}
			}
    }
</script>

